home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sources / xman / vendor.h < prev    next >
C/C++ Source or Header  |  1994-09-27  |  4KB  |  140 lines

  1. /*
  2.  * $XConsortium: vendor.h,v 1.7 91/08/20 14:27:57 gildea Exp $
  3.  *
  4.  * Copyright 1991 Massachusetts Institute of Technology
  5.  *
  6.  * Permission to use, copy, modify, and distribute this software and its
  7.  * documentation for any purpose and without fee is hereby granted, provided
  8.  * that the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of M.I.T. not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  M.I.T. makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  */
  16.  
  17. /* Vendor-specific definitions */
  18.  
  19. #define SUFFIX "suffix"
  20. #define FOLD "fold"
  21. #define FOLDSUFFIX "foldsuffix"
  22. #define MNULL 0
  23. #define MSUFFIX 1
  24. #define MFOLD 2
  25. #define MFOLDSUFFIX 3
  26.  
  27. /*
  28.  * The directories to search.  Assume that the manual directories are more
  29.  * complete than the cat directories.
  30.  */
  31.  
  32. #if ( defined(UTEK) || defined(apollo) )
  33. #  define SEARCHDIR  CAT
  34. #else
  35. #  define SEARCHDIR  MAN
  36. #endif
  37.  
  38. #if ( defined(sgi) || defined(SYSV386) )
  39. # define SEARCHOTHER CAT
  40. #endif
  41.  
  42. /*
  43.  * The default manual page directory.
  44.  *
  45.  * The MANPATH enviornment variable will override this.
  46.  */
  47.  
  48. #ifndef SYSMANPATH
  49.  
  50. #ifdef macII
  51. #  define SYSMANPATH "/usr/catman/u_man:/usr/catman/a_man"
  52. #endif /* macII */
  53. #ifdef SVR4
  54. #  define SYSMANPATH "/usr/share/man"
  55. #endif /* SVR4 */
  56. #ifdef hcx
  57. #  define SYSMANPATH "/usr/catman/local_man:/usr/catman/u_man:/usr/catman/a_man:/usr/catman/p_man:/usr/catman/ada_man"
  58. #endif /* hcx */
  59. #if defined(SYSV) && defined(SYSV386)
  60. #  define SYSMANPATH "/usr/catman/u_man:/usr/catman/p_man"
  61. #endif /* SYSV386 */
  62. #ifdef sgi
  63. #  define SYSMANPATH "/usr/catman/a_man:/usr/catman/g_man:/usr/catman/p_man:/usr/catman/u_man:/usr/man/p_man:/usr/man/u_man:/usr/man"
  64. #endif /* sgi */
  65.  
  66. #ifndef SYSMANPATH
  67. #  define SYSMANPATH "/usr/man"
  68. #endif
  69.  
  70. #endif
  71.  
  72. /*
  73.  * Compression Definitions.
  74.  */
  75.  
  76. #if defined( macII ) || defined( hcx ) || (defined(SYSV) && defined(SYSV386)) || defined(sgi)
  77. #  define COMPRESSION_EXTENSION   "z"
  78. #  define UNCOMPRESS_FORMAT       "pcat %s > %s"
  79. #  define NO_COMPRESS        /* mac can't handle using pack as a filter and
  80.                    xman needs it to be done that way. */
  81. #else
  82. #  if defined ( UTEK )
  83. #    define COMPRESSION_EXTENSION "C"
  84. #    define UNCOMPRESS_FORMAT     "ccat < %s > %s"
  85. #    define COMPRESS              "compact"
  86. #  else
  87. #    define COMPRESSION_EXTENSION "Z"
  88. #    define UNCOMPRESS_FORMAT     "zcat < %s > %s"
  89. #    define COMPRESS              "compress"
  90. #  endif /* UTEK */
  91. #endif /* macII, hcx, SYSV386, sgi */
  92.  
  93.  
  94.  
  95. /*
  96.  * The command filters for the manual and apropos searches.
  97.  */
  98.  
  99. #if ( defined(hpux) || defined(macII) || defined(CRAY) || defined(ultrix) || defined(hcx) )
  100. #  define NO_MANPATH_SUPPORT
  101. #endif
  102.  
  103. #ifdef NO_MANPATH_SUPPORT
  104. #  define APROPOS_FORMAT ("man -k %s | pr -h Apropos >> %s")
  105. #else
  106. #  define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos > %s")
  107. #endif
  108.  
  109. #if defined( ultrix )
  110. #  define FORMAT "| nroff -man"             /* The format command. */
  111. #else
  112. #  define FORMAT "| neqn | nroff -man"      /* The format command. */
  113. #endif
  114.  
  115. /*
  116.  * Names of the man and cat dirs.
  117.  */
  118.  
  119. #define MAN "man"
  120.  
  121. #if ( defined(macII) || defined(CRAY) || defined(hcx) || (defined(SYSV) && defined(SYSV386)) )
  122. /*
  123.  * The Apple, Cray,, SYSV386, and HCX folks put the preformatted pages in the
  124.  * "man" directories.
  125.  */
  126. #  define CAT MAN
  127. #else
  128. #  define CAT "cat"
  129. #endif
  130.  
  131. extern void AddStandardSections();
  132. extern void AddNewSection();
  133.  
  134. typedef struct _SectionList {
  135.   struct _SectionList * next;
  136.   char * label;            /* section label */
  137.   char * directory;        /* section directory */
  138.   int flags;
  139. } SectionList;
  140.